/**
 ***********************************************************************************************************
 * 
 ***********************************************************************************************************
 * @file RBD3D9HardwareBufferManager.h
 ***********************************************************************************************************/

#ifndef __RBD3D9HARDWAREBUFFERMANAGER_H__
#define __RBD3D9HARDWAREBUFFERMANAGER_H__

#ifdef  HEADER_ONCE
#pragma HEADER_ONCE
#endif

#ifdef  HEADER_MSG
#pragma HEADER_MSG(RBD3D9HardwareBufferManager.h)
#endif

/***********************************************************************************************************
 * Includes
 ***********************************************************************************************************/
#include <RBMain/RBHardwareBufferManager.h>
#include <RBMain/RBPixelFormat.h>

/***********************************************************************************************************
 * Forward declarations
 ***********************************************************************************************************/
class RBD3D9Renderer;

/***********************************************************************************************************
 * Classes
 ***********************************************************************************************************/

class RBD3D9HardwareBufferManager : public RBHardwareBufferManager
{
    RBDeclareRTTI(RBD3D9HardwareBufferManager, RBHardwareBufferManager)
public:
				                    RBD3D9HardwareBufferManager     ();
    virtual                        ~RBD3D9HardwareBufferManager     ();

    virtual RBVertexBuffer*         CreateVertexBuffer              (uint32 uiUsage, uint32 uiVertexSize, uint32 uiVertexCount, const void* pInitData);
    virtual RBIndexBuffer*          CreateIndexBuffer               (uint32 uiUsage, RBIndexBufferType::EType eIndexType, uint32 uiIndexCount, const void* pInitData);
    virtual RBVertexDeclaration*    CreateVertexDeclaration         (RBVertexElement* pElements, uint32 uiElementCount);
    virtual RBTexture*              CreateTexture                   (const char* pcFilename);
    virtual RBTexture*              CreateTexture                   (uint32 uiUsage, uint32 uiWidth, uint32 uiHeight, 
                                                                     RBPixelFormat eFormat, RBTextureType::EType eType,
                                                                     uint32 uiMips = 0, uint32 uiDepth = 0, uint32 eMemPool = 1);

    virtual RBPixelBuffer*          CreateRenderTarget              (uint32 uiUsage, uint32 uiWidth, uint32 uiHeight, RBPixelFormat eFormat, 
                                                                     uint32 uiMSAA);

    void                            OnReset                         (bool bBeforeReset);

};


/***********************************************************************************************************/

#endif // __RBD3D9HARDWAREBUFFERMANAGER_H__